package com.fary.context.event;

import com.fary.context.ApplicationEvent;
import com.fary.context.ApplicationListener;
import com.fary.core.Ordered;


public interface SmartApplicationListener extends ApplicationListener<ApplicationEvent>, Ordered {

	boolean supportsEventType(Class<? extends ApplicationEvent> eventType);

	default boolean supportsSourceType(Class<?> sourceType) {
		return true;
	}

	@Override
	default int getOrder() {
		return LOWEST_PRECEDENCE;
	}

}